A BetterExplained article that discusses how to reduce the initial load time of JavaScript files. Covers measuring load times, and a number of approaches to delaying the loading of a JavaScript file. Also covers minifying JavaScript and maintaining a debug version of code. Also covers an AJAX onLoad pattern to dynamically include JavaScript after page load, and HTTP caching of external JavaScript files
Douglas Crockford examines the need for minimising the size of JavaScript code and compares minification and obfuscation. Obfuscation has the side-effect of introducing bugs because it changes variable names. The recommended approach is minification along with GZip compression. Since JavaScript is sent along in source form, it is impossible to hide that from a determined hacker